home *** CD-ROM | disk | FTP | other *** search
- Path: news.bridge.net!news
- From: David Byrden <100101.2547@compuserve.com>
- Newsgroups: comp.lang.c++
- Subject: Re: I need some help with a homework
- Date: 22 Feb 1996 04:32:34 GMT
- Organization: self-employed
- Message-ID: <4ggrl2$fg3@news.bridge.net>
- References: <4g8o4f$m93@ixnews7.ix.netcom.com>
- NNTP-Posting-Host: ppp-mia1-49.bridge.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
-
-
- >> I need some help with this simple program for some but, very
- >> difficult for me.
-
- Leonel;
-
- Take a pencil and paper.
-
- Start at the start of "main" and work your way down slowly through the
- statements of the program.
-
- At each statement, let you do exactly what the computer would do. If it
- is a variable declaration, let you draw a box on the paper and write the
- variable's name over it. If it puts a value in a variable, let you put a
- number in the appropriate box. If it is an "if" statement, let you decide
- which way to go, etc etc.
-
- After a while, you will find a place where the computer does something
- which is not what you want it to do. You will then be able to alter the
- program. I assure you tha you already know enough C++ to write it
- correctly.
-
- One could simply point out the error to you, but I believe that one
- learns by doing.
-
- David
-
-
-